#include <stdio.h>
#include <stdlib.h>
int main()
{
	int i,j,k,t;
	char a[26]={'A','B','C','D','E','F','G',
	'H','I','J','K','L','M','N','O','P','Q',
	'R','S','T','U','V','W','X','Y','Z'};
    scanf("%d",&t); 
    i=t/676;
    j=t/26%26;
    k=t%26;
    printf("%c%c%c",a[i-1],a[j-1],a[k-1]); 
    return 0;
}

